Extensible type checker for parser generation
نویسنده
چکیده
Parser generators generate translators from language specifications. In many cases, such specifications contain semantic actions written in the same language as the generated code. Since these actions are subject to little static checking, they are usually a source of errors which are discovered only when generated code is compiled. In this paper we propose a parser generator front-end which statically checks semantic actions for typing errors and prevents such errors from appearing in generated code. The type checking procedure is extensible to support many implementation languages. An extension for Java is presented along with an extension for declarative type system
منابع مشابه
CJC: An Extensible Checker for the CleanJava Annotation Language
CleanJava is a formal annotation language for the Java programming language to support a Cleanroom-style functional program verification technique that views programs as mathematical functions. It needs a suite of support tools including a checker that can parse annotations and check them for syntactic and static semantic correctness. The two key requirements of the checker are flexibility and ...
متن کاملBuilding Extensible Specifications and Implementations of Promela with AbleP
This paper describes how new language features can be seamlessly added to an extensible specification of Promela to provide new (domain-specific) notations and analyses to the engineer. This is accomplished using ableP, an extensible specification and implementation of Promela, the modeling language used by the spin model checker. Language extensions described here include an enhanced select-st...
متن کاملPSLR(1): Pseudo-Scannerless Minimal LR(1) for the Deterministic Parsing of Composite Languages
Composite languages are composed of multiple sub-languages. Examples include the parser specification languages read by parser generators like Yacc, modern extensible languages with complex layers of domain-specific sub-languages, and even traditional programming languages like C and C++. In this dissertation, we describe PSLR(1), a new scanner-based LR(1) parser generation system that automati...
متن کاملA Parser System for Extensible Dependency Grammar
This paper introduces a parser system for the meta grammar formalism of Extensible Dependency Grammar (XDG). XDG is a generalisation of Topological Dependency Grammar (TDG) (Duchier and Debusmann, 2001). The XDG parser system comprises a constraintbased parser for all possible instances of XDG, a statically typed grammar input language, and a flexible backend for handling parser output. A power...
متن کاملHygienic Source-Code Generation Using Functors
Existing source-code-generating tools such as Lex and Yacc suffer from practical inconveniences because they use disembodied code to implement actions. To prevent this problem, such tools could generate closed functors that are then instantiated by the programmer with appropriate action code. This results in all code being type checked in its appropriate context, and it assists the type checker...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1002.1549 شماره
صفحات -
تاریخ انتشار 2010